<?
	session_start();
	include('conn.php');
	$qry1 = "SELECT * from stbTable where status='0' order by id desc";

	$qry = mysql_query($qry1);
	$data = array();

	while($rows = mysql_fetch_array($qry))
	{
		$data[] = array
			(			
				"id" => $rows['id'],
				"num" => $rows['stbno'],				
				"flag" => $rows['flag']				
			);
	}
	echo json_encode($data);
?>